package com.zr.spring.listener;

import org.springframework.context.support.ClassPathXmlApplicationContext;


public class Main {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContent.xml");
        MyPublisher publisher = (MyPublisher) context.getBean("publisher");

        while (true) {
            Event event = new Event(context, "zhangrui");
            publisher.publishEvent(event);
            System.out.println("hello world");
        }
    }
}
